VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmConfigureInput 
   AutoRedraw      =   -1  'True
   BorderStyle     =   1  'Fixed Single
   Caption         =   "configure input"
   ClientHeight    =   3240
   ClientLeft      =   4890
   ClientTop       =   3510
   ClientWidth     =   6465
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmConfigureInput.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   216
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   431
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin TabDlg.SSTab SSTab1 
      Height          =   3075
      Left            =   90
      TabIndex        =   0
      Top             =   90
      Width           =   6285
      _ExtentX        =   11086
      _ExtentY        =   5424
      _Version        =   393216
      Style           =   1
      Tabs            =   2
      TabsPerRow      =   2
      TabHeight       =   529
      WordWrap        =   0   'False
      ShowFocusRect   =   0   'False
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      TabCaption(0)   =   "keyboard"
      TabPicture(0)   =   "frmConfigureInput.frx":08CA
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Frame1"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "Frame2"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "Command2(0)"
      Tab(0).Control(2).Enabled=   0   'False
      Tab(0).Control(3)=   "Command1(0)"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).ControlCount=   4
      TabCaption(1)   =   "pc gamepad"
      TabPicture(1)   =   "frmConfigureInput.frx":08E6
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "Command1(1)"
      Tab(1).Control(1)=   "Command2(1)"
      Tab(1).Control(2)=   "Frame3"
      Tab(1).Control(3)=   "Frame4"
      Tab(1).ControlCount=   4
      Begin VB.CommandButton Command1 
         Caption         =   "defaults"
         Height          =   420
         Index           =   1
         Left            =   -74880
         TabIndex        =   27
         Top             =   2520
         Width           =   1410
      End
      Begin VB.CommandButton Command2 
         Caption         =   "save"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   420
         Index           =   1
         Left            =   -70260
         TabIndex        =   28
         Top             =   2520
         Width           =   1410
      End
      Begin VB.CommandButton Command1 
         Caption         =   "defaults"
         Height          =   420
         Index           =   0
         Left            =   120
         TabIndex        =   15
         Top             =   2520
         Width           =   1410
      End
      Begin VB.CommandButton Command2 
         Caption         =   "save"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   420
         Index           =   0
         Left            =   4740
         TabIndex        =   16
         Top             =   2520
         Width           =   1410
      End
      Begin VB.Frame Frame3 
         Caption         =   "pc gamepad #2"
         Height          =   1815
         Left            =   -71790
         TabIndex        =   47
         Top             =   450
         Width           =   2955
         Begin VB.CheckBox Check2 
            Caption         =   "use pc gamepad"
            Height          =   210
            Left            =   120
            TabIndex        =   23
            Top             =   270
            Width           =   1725
         End
         Begin VB.ComboBox Combo7 
            Height          =   315
            Left            =   120
            Style           =   2  'Dropdown List
            TabIndex        =   24
            Top             =   570
            Width           =   700
         End
         Begin VB.ComboBox Combo8 
            Height          =   315
            Left            =   120
            Style           =   2  'Dropdown List
            TabIndex        =   25
            Top             =   975
            Width           =   700
         End
         Begin VB.ComboBox Combo9 
            Height          =   315
            Left            =   1530
            Style           =   2  'Dropdown List
            TabIndex        =   26
            Top             =   975
            Width           =   700
         End
         Begin VB.Label Label21 
            AutoSize        =   -1  'True
            Caption         =   "joypad"
            Height          =   195
            Left            =   930
            TabIndex        =   50
            Top             =   615
            Width           =   495
         End
         Begin VB.Label Label20 
            AutoSize        =   -1  'True
            Caption         =   "1"
            Height          =   195
            Left            =   930
            TabIndex        =   49
            Top             =   1020
            Width           =   90
         End
         Begin VB.Label Label19 
            AutoSize        =   -1  'True
            Caption         =   "2"
            Height          =   195
            Left            =   2340
            TabIndex        =   48
            Top             =   1020
            Width           =   90
         End
      End
      Begin VB.Frame Frame4 
         Caption         =   "pc gamepad #1"
         Height          =   1815
         Left            =   -74880
         TabIndex        =   43
         Top             =   450
         Width           =   2955
         Begin VB.ComboBox Combo2 
            Height          =   315
            Left            =   1530
            Style           =   2  'Dropdown List
            TabIndex        =   22
            Top             =   1380
            Width           =   700
         End
         Begin VB.CheckBox Check1 
            Caption         =   "use pc gamepad"
            Height          =   210
            Left            =   120
            TabIndex        =   17
            Top             =   270
            Width           =   1635
         End
         Begin VB.ComboBox Combo1 
            Height          =   315
            Left            =   120
            Style           =   2  'Dropdown List
            TabIndex        =   21
            Top             =   1380
            Width           =   700
         End
         Begin VB.ComboBox Combo4 
            Height          =   315
            Left            =   1530
            Style           =   2  'Dropdown List
            TabIndex        =   20
            Top             =   975
            Width           =   700
         End
         Begin VB.ComboBox Combo3 
            Height          =   315
            Left            =   120
            Style           =   2  'Dropdown List
            TabIndex        =   19
            Top             =   975
            Width           =   700
         End
         Begin VB.ComboBox Combo6 
            Height          =   315
            Left            =   120
            Style           =   2  'Dropdown List
            TabIndex        =   18
            Top             =   570
            Width           =   700
         End
         Begin VB.Label Label16 
            AutoSize        =   -1  'True
            Caption         =   "pause"
            Height          =   195
            Left            =   2340
            TabIndex        =   54
            Top             =   1425
            Width           =   435
         End
         Begin VB.Label Label8 
            AutoSize        =   -1  'True
            Caption         =   "start"
            Height          =   195
            Left            =   930
            TabIndex        =   52
            Top             =   1425
            Width           =   345
         End
         Begin VB.Label Label24 
            AutoSize        =   -1  'True
            Caption         =   "2"
            Height          =   195
            Left            =   2340
            TabIndex        =   46
            Top             =   1020
            Width           =   90
         End
         Begin VB.Label Label25 
            AutoSize        =   -1  'True
            Caption         =   "1"
            Height          =   195
            Left            =   930
            TabIndex        =   45
            Top             =   1020
            Width           =   90
         End
         Begin VB.Label Label26 
            AutoSize        =   -1  'True
            Caption         =   "joypad"
            Height          =   195
            Left            =   930
            TabIndex        =   44
            Top             =   615
            Width           =   495
         End
      End
      Begin VB.Frame Frame2 
         Caption         =   "input #2"
         Height          =   1965
         Left            =   3210
         TabIndex        =   36
         Top             =   450
         Width           =   2955
         Begin VB.TextBox Text9 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   9
            Text            =   "Text1"
            Top             =   270
            Width           =   510
         End
         Begin VB.TextBox Text10 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   10
            Text            =   "Text1"
            Top             =   690
            Width           =   510
         End
         Begin VB.TextBox Text11 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   11
            Text            =   "Text1"
            Top             =   1110
            Width           =   510
         End
         Begin VB.TextBox Text12 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   12
            Text            =   "Text1"
            Top             =   1530
            Width           =   510
         End
         Begin VB.TextBox Text13 
            Height          =   315
            Left            =   1440
            Locked          =   -1  'True
            TabIndex        =   13
            Text            =   "Text1"
            Top             =   270
            Width           =   510
         End
         Begin VB.TextBox Text14 
            Height          =   315
            Left            =   1440
            Locked          =   -1  'True
            TabIndex        =   14
            Text            =   "Text1"
            Top             =   690
            Width           =   510
         End
         Begin VB.Label Label9 
            AutoSize        =   -1  'True
            Caption         =   "up"
            Height          =   195
            Left            =   750
            TabIndex        =   42
            Top             =   315
            Width           =   180
         End
         Begin VB.Label Label10 
            AutoSize        =   -1  'True
            Caption         =   "down"
            Height          =   195
            Left            =   750
            TabIndex        =   41
            Top             =   750
            Width           =   390
         End
         Begin VB.Label Label11 
            AutoSize        =   -1  'True
            Caption         =   "left"
            Height          =   195
            Left            =   750
            TabIndex        =   40
            Top             =   1140
            Width           =   240
         End
         Begin VB.Label Label12 
            AutoSize        =   -1  'True
            Caption         =   "right"
            Height          =   195
            Left            =   750
            TabIndex        =   39
            Top             =   1560
            Width           =   330
         End
         Begin VB.Label Label13 
            AutoSize        =   -1  'True
            Caption         =   "1"
            Height          =   195
            Left            =   2070
            TabIndex        =   38
            Top             =   315
            Width           =   90
         End
         Begin VB.Label Label14 
            AutoSize        =   -1  'True
            Caption         =   "2"
            Height          =   195
            Left            =   2070
            TabIndex        =   37
            Top             =   750
            Width           =   90
         End
      End
      Begin VB.Frame Frame1 
         Caption         =   "input #1"
         Height          =   1965
         Left            =   120
         TabIndex        =   29
         Top             =   450
         Width           =   2955
         Begin VB.TextBox Text8 
            Height          =   315
            Left            =   1440
            Locked          =   -1  'True
            TabIndex        =   8
            Text            =   "Text1"
            Top             =   1530
            Width           =   510
         End
         Begin VB.TextBox Text7 
            Height          =   315
            Left            =   1440
            Locked          =   -1  'True
            TabIndex        =   7
            Text            =   "Text1"
            Top             =   1110
            Width           =   510
         End
         Begin VB.TextBox Text6 
            Height          =   315
            Left            =   1440
            Locked          =   -1  'True
            TabIndex        =   6
            Text            =   "Text1"
            Top             =   690
            Width           =   510
         End
         Begin VB.TextBox Text5 
            Height          =   315
            Left            =   1440
            Locked          =   -1  'True
            TabIndex        =   5
            Text            =   "Text1"
            Top             =   270
            Width           =   510
         End
         Begin VB.TextBox Text4 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   4
            Text            =   "Text1"
            Top             =   1530
            Width           =   510
         End
         Begin VB.TextBox Text3 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   3
            Text            =   "Text1"
            Top             =   1110
            Width           =   510
         End
         Begin VB.TextBox Text2 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   2
            Text            =   "Text1"
            Top             =   690
            Width           =   510
         End
         Begin VB.TextBox Text1 
            Height          =   315
            Left            =   120
            Locked          =   -1  'True
            TabIndex        =   1
            Text            =   "Text1"
            Top             =   270
            Width           =   510
         End
         Begin VB.Label Label15 
            AutoSize        =   -1  'True
            Caption         =   "pause"
            Height          =   195
            Left            =   2070
            TabIndex        =   53
            Top             =   1560
            Width           =   435
         End
         Begin VB.Label Label7 
            AutoSize        =   -1  'True
            Caption         =   "start"
            Height          =   195
            Left            =   2070
            TabIndex        =   51
            Top             =   1140
            Width           =   345
         End
         Begin VB.Label Label6 
            AutoSize        =   -1  'True
            Caption         =   "2"
            Height          =   195
            Left            =   2070
            TabIndex        =   35
            Top             =   720
            Width           =   90
         End
         Begin VB.Label Label5 
            AutoSize        =   -1  'True
            Caption         =   "1"
            Height          =   195
            Left            =   2070
            TabIndex        =   34
            Top             =   315
            Width           =   90
         End
         Begin VB.Label Label4 
            AutoSize        =   -1  'True
            Caption         =   "right"
            Height          =   195
            Left            =   750
            TabIndex        =   33
            Top             =   1560
            Width           =   330
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "left"
            Height          =   195
            Left            =   750
            TabIndex        =   32
            Top             =   1170
            Width           =   240
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "down"
            Height          =   195
            Left            =   750
            TabIndex        =   31
            Top             =   720
            Width           =   390
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "up"
            Height          =   195
            Left            =   750
            TabIndex        =   30
            Top             =   315
            Width           =   180
         End
      End
   End
End
Attribute VB_Name = "frmConfigureInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click(Index As Integer)

  Text1.Text = vbKeyUp
  Text2.Text = vbKeyDown
  Text3.Text = vbKeyLeft
  Text4.Text = vbKeyRight
  Text5.Text = vbKeyZ
  Text6.Text = vbKeyX
  Text7.Text = vbKeyC
  Text8.Text = vbKeyReturn
  
  Text9.Text = 0
  Text10.Text = 0
  Text11.Text = 0
  Text12.Text = 0
  Text13.Text = 0
  Text14.Text = 0

  Check1.value = 0
  Check2.value = 0

End Sub

Private Sub Command2_Click(Index As Integer)

  Input1_Up = CInt(Text1.Text)
  Input1_Down = CInt(Text2.Text)
  Input1_Left = CInt(Text3.Text)
  Input1_Right = CInt(Text4.Text)
  Input1_1 = CInt(Text5.Text)
  Input1_2 = CInt(Text6.Text)
  Input1_GGStart = CInt(Text7.Text)
  Input1_Pause = CInt(Text8.Text)
  Input2_Up = CInt(Text9.Text)
  Input2_Down = CInt(Text10.Text)
  Input2_Left = CInt(Text11.Text)
  Input2_Right = CInt(Text12.Text)
  Input2_1 = CInt(Text13.Text)
  Input2_2 = CInt(Text14.Text)

  Select Case Combo6.Text
    Case "1": Input1_WhichGamepad = JOYSTICK1
    Case "2": Input1_WhichGamepad = JOYSTICK2
  End Select
  Select Case Combo7.Text
    Case "1": Input2_WhichGamepad = JOYSTICK1
    Case "2": Input2_WhichGamepad = JOYSTICK2
  End Select

  Select Case Combo2.ListIndex
    Case 0: Joy1_Pause = JOY_BUTTON1
    Case 1: Joy1_Pause = JOY_BUTTON2
    Case 2: Joy1_Pause = JOY_BUTTON3
    Case 3: Joy1_Pause = JOY_BUTTON4
    Case 4: Joy1_Pause = JOY_BUTTON5
    Case 5: Joy1_Pause = JOY_BUTTON6
    Case 6: Joy1_Pause = JOY_BUTTON7
    Case 7: Joy1_Pause = JOY_BUTTON8
    Case 8: Joy1_Pause = JOY_BUTTON9
    Case 9: Joy1_Pause = JOY_BUTTON10
    Case 10: Joy1_Pause = JOY_BUTTON11
    Case 11: Joy1_Pause = JOY_BUTTON12
  End Select
  Select Case Combo3.ListIndex
    Case 0: Joy1_1 = JOY_BUTTON1
    Case 1: Joy1_1 = JOY_BUTTON2
    Case 2: Joy1_1 = JOY_BUTTON3
    Case 3: Joy1_1 = JOY_BUTTON4
    Case 4: Joy1_1 = JOY_BUTTON5
    Case 5: Joy1_1 = JOY_BUTTON6
    Case 6: Joy1_1 = JOY_BUTTON7
    Case 7: Joy1_1 = JOY_BUTTON8
    Case 8: Joy1_1 = JOY_BUTTON9
    Case 9: Joy1_1 = JOY_BUTTON10
    Case 10: Joy1_1 = JOY_BUTTON11
    Case 11: Joy1_1 = JOY_BUTTON12
  End Select
  Select Case Combo4.ListIndex
    Case 0: Joy1_2 = JOY_BUTTON1
    Case 1: Joy1_2 = JOY_BUTTON2
    Case 2: Joy1_2 = JOY_BUTTON3
    Case 3: Joy1_2 = JOY_BUTTON4
    Case 4: Joy1_2 = JOY_BUTTON5
    Case 5: Joy1_2 = JOY_BUTTON6
    Case 6: Joy1_2 = JOY_BUTTON7
    Case 7: Joy1_2 = JOY_BUTTON8
    Case 8: Joy1_2 = JOY_BUTTON9
    Case 9: Joy1_2 = JOY_BUTTON10
    Case 10: Joy1_2 = JOY_BUTTON11
    Case 11: Joy1_2 = JOY_BUTTON12
  End Select
  Select Case Combo1.ListIndex
    Case 0: Joy1_GGStart = JOY_BUTTON1
    Case 1: Joy1_GGStart = JOY_BUTTON2
    Case 2: Joy1_GGStart = JOY_BUTTON3
    Case 3: Joy1_GGStart = JOY_BUTTON4
    Case 4: Joy1_GGStart = JOY_BUTTON5
    Case 5: Joy1_GGStart = JOY_BUTTON6
    Case 6: Joy1_GGStart = JOY_BUTTON7
    Case 7: Joy1_GGStart = JOY_BUTTON8
    Case 8: Joy1_GGStart = JOY_BUTTON9
    Case 9: Joy1_GGStart = JOY_BUTTON10
    Case 10: Joy1_GGStart = JOY_BUTTON11
    Case 11: Joy1_GGStart = JOY_BUTTON12
  End Select

  Select Case Combo8.ListIndex
    Case 0: Joy2_1 = JOY_BUTTON1
    Case 1: Joy2_1 = JOY_BUTTON2
    Case 2: Joy2_1 = JOY_BUTTON3
    Case 3: Joy2_1 = JOY_BUTTON4
    Case 4: Joy2_1 = JOY_BUTTON5
    Case 5: Joy2_1 = JOY_BUTTON6
    Case 6: Joy2_1 = JOY_BUTTON7
    Case 7: Joy2_1 = JOY_BUTTON8
    Case 8: Joy2_1 = JOY_BUTTON9
    Case 9: Joy2_1 = JOY_BUTTON10
    Case 10: Joy2_1 = JOY_BUTTON11
    Case 11: Joy2_1 = JOY_BUTTON12
  End Select
  Select Case Combo9.ListIndex
    Case 0: Joy2_2 = JOY_BUTTON1
    Case 1: Joy2_2 = JOY_BUTTON2
    Case 2: Joy2_2 = JOY_BUTTON3
    Case 3: Joy2_2 = JOY_BUTTON4
    Case 4: Joy2_2 = JOY_BUTTON5
    Case 5: Joy2_2 = JOY_BUTTON6
    Case 6: Joy2_2 = JOY_BUTTON7
    Case 7: Joy2_2 = JOY_BUTTON8
    Case 8: Joy2_2 = JOY_BUTTON9
    Case 9: Joy2_2 = JOY_BUTTON10
    Case 10: Joy2_2 = JOY_BUTTON11
    Case 11: Joy2_2 = JOY_BUTTON12
  End Select

  If Check1.value = 0 Then Input1_UseGamepad = False Else Input1_UseGamepad = True
  If Check2.value = 0 Then Input2_UseGamepad = False Else Input2_UseGamepad = True

  Call Unload(Me)

End Sub
Private Sub Form_Load()

  Dim a

  SSTab1.left = Me.ScaleWidth / 2 - SSTab1.Width / 2
  SSTab1.top = Me.ScaleHeight / 2 - SSTab1.Height / 2

  Text1.Text = Input1_Up
  Text2.Text = Input1_Down
  Text3.Text = Input1_Left
  Text4.Text = Input1_Right
  Text5.Text = Input1_1
  Text6.Text = Input1_2
  Text7.Text = Input1_GGStart
  Text8.Text = Input1_Pause
  Text9.Text = Input2_Up
  Text10.Text = Input2_Down
  Text11.Text = Input2_Left
  Text12.Text = Input2_Right
  Text13.Text = Input2_1
  Text14.Text = Input2_2

  Combo6.AddItem "1"
  Combo6.AddItem "2"
  Combo7.AddItem "1"
  Combo7.AddItem "2"

  a = 1
  Do
    Combo1.AddItem "b. " & a
    Combo2.AddItem "b. " & a
    Combo3.AddItem "b. " & a
    Combo4.AddItem "b. " & a
    Combo8.AddItem "b. " & a
    Combo9.AddItem "b. " & a
    a = a + 1
  Loop Until a = 13

  Select Case Input1_WhichGamepad
    Case JOYSTICK1: Combo6.ListIndex = 0
    Case JOYSTICK2: Combo6.ListIndex = 1
  End Select

  Select Case Input2_WhichGamepad
    Case JOYSTICK1: Combo7.ListIndex = 0
    Case JOYSTICK2: Combo7.ListIndex = 1
  End Select

  Select Case Joy1_1
    Case JOY_BUTTON1: Combo3.ListIndex = 0
    Case JOY_BUTTON2: Combo3.ListIndex = 1
    Case JOY_BUTTON3: Combo3.ListIndex = 2
    Case JOY_BUTTON4: Combo3.ListIndex = 3
    Case JOY_BUTTON5: Combo3.ListIndex = 4
    Case JOY_BUTTON6: Combo3.ListIndex = 5
    Case JOY_BUTTON7: Combo3.ListIndex = 6
    Case JOY_BUTTON8: Combo3.ListIndex = 7
    Case JOY_BUTTON9: Combo3.ListIndex = 8
    Case JOY_BUTTON10: Combo3.ListIndex = 9
    Case JOY_BUTTON11: Combo3.ListIndex = 10
    Case JOY_BUTTON12: Combo3.ListIndex = 11
  End Select
  Select Case Joy1_2
    Case JOY_BUTTON1: Combo4.ListIndex = 0
    Case JOY_BUTTON2: Combo4.ListIndex = 1
    Case JOY_BUTTON3: Combo4.ListIndex = 2
    Case JOY_BUTTON4: Combo4.ListIndex = 3
    Case JOY_BUTTON5: Combo4.ListIndex = 4
    Case JOY_BUTTON6: Combo4.ListIndex = 5
    Case JOY_BUTTON7: Combo4.ListIndex = 6
    Case JOY_BUTTON8: Combo4.ListIndex = 7
    Case JOY_BUTTON9: Combo4.ListIndex = 8
    Case JOY_BUTTON10: Combo4.ListIndex = 9
    Case JOY_BUTTON11: Combo4.ListIndex = 10
    Case JOY_BUTTON12: Combo4.ListIndex = 11
  End Select
  Select Case Joy1_Pause
    Case JOY_BUTTON1: Combo2.ListIndex = 0
    Case JOY_BUTTON2: Combo2.ListIndex = 1
    Case JOY_BUTTON3: Combo2.ListIndex = 2
    Case JOY_BUTTON4: Combo2.ListIndex = 3
    Case JOY_BUTTON5: Combo2.ListIndex = 4
    Case JOY_BUTTON6: Combo2.ListIndex = 5
    Case JOY_BUTTON7: Combo2.ListIndex = 6
    Case JOY_BUTTON8: Combo2.ListIndex = 7
    Case JOY_BUTTON9: Combo2.ListIndex = 8
    Case JOY_BUTTON10: Combo2.ListIndex = 9
    Case JOY_BUTTON11: Combo2.ListIndex = 10
    Case JOY_BUTTON12: Combo2.ListIndex = 11
  End Select
  Select Case Joy1_GGStart
    Case JOY_BUTTON1: Combo1.ListIndex = 0
    Case JOY_BUTTON2: Combo1.ListIndex = 1
    Case JOY_BUTTON3: Combo1.ListIndex = 2
    Case JOY_BUTTON4: Combo1.ListIndex = 3
    Case JOY_BUTTON5: Combo1.ListIndex = 4
    Case JOY_BUTTON6: Combo1.ListIndex = 5
    Case JOY_BUTTON7: Combo1.ListIndex = 6
    Case JOY_BUTTON8: Combo1.ListIndex = 7
    Case JOY_BUTTON9: Combo1.ListIndex = 8
    Case JOY_BUTTON10: Combo1.ListIndex = 9
    Case JOY_BUTTON11: Combo1.ListIndex = 10
    Case JOY_BUTTON12: Combo1.ListIndex = 11
  End Select
  Select Case Joy2_1
    Case JOY_BUTTON1: Combo8.ListIndex = 0
    Case JOY_BUTTON2: Combo8.ListIndex = 1
    Case JOY_BUTTON3: Combo8.ListIndex = 2
    Case JOY_BUTTON4: Combo8.ListIndex = 3
    Case JOY_BUTTON5: Combo8.ListIndex = 4
    Case JOY_BUTTON6: Combo8.ListIndex = 5
    Case JOY_BUTTON7: Combo8.ListIndex = 6
    Case JOY_BUTTON8: Combo8.ListIndex = 7
    Case JOY_BUTTON9: Combo8.ListIndex = 8
    Case JOY_BUTTON10: Combo8.ListIndex = 9
    Case JOY_BUTTON11: Combo8.ListIndex = 10
    Case JOY_BUTTON12: Combo8.ListIndex = 11
  End Select
  Select Case Joy2_2
    Case JOY_BUTTON1: Combo9.ListIndex = 0
    Case JOY_BUTTON2: Combo9.ListIndex = 1
    Case JOY_BUTTON3: Combo9.ListIndex = 2
    Case JOY_BUTTON4: Combo9.ListIndex = 3
    Case JOY_BUTTON5: Combo9.ListIndex = 4
    Case JOY_BUTTON6: Combo9.ListIndex = 5
    Case JOY_BUTTON7: Combo9.ListIndex = 6
    Case JOY_BUTTON8: Combo9.ListIndex = 7
    Case JOY_BUTTON9: Combo9.ListIndex = 8
    Case JOY_BUTTON10: Combo9.ListIndex = 9
    Case JOY_BUTTON11: Combo9.ListIndex = 10
    Case JOY_BUTTON12: Combo9.ListIndex = 11
  End Select

  If Input1_UseGamepad = True Then Check1.value = 1 Else Check1.value = 0
  If Input2_UseGamepad = True Then Check2.value = 1 Else Check2.value = 0

End Sub

Private Sub Form_Unload(Cancel As Integer)
  Call SaveSetting("olafnes", "configkeys", "top", Me.top)
  Call SaveSetting("olafnes", "configkeys", "left", Me.left)
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
  Text1.Text = KeyCode
  Call Text2.SetFocus
End Sub

Private Sub Text10_KeyUp(KeyCode As Integer, Shift As Integer)
  Text10.Text = KeyCode
  Call Text11.SetFocus
End Sub

Private Sub Text11_KeyUp(KeyCode As Integer, Shift As Integer)
  Text11.Text = KeyCode
  Call Text12.SetFocus
End Sub

Private Sub Text12_KeyUp(KeyCode As Integer, Shift As Integer)
  Text12.Text = KeyCode
  Call Text13.SetFocus
End Sub

Private Sub Text13_KeyUp(KeyCode As Integer, Shift As Integer)
  Text13.Text = KeyCode
  Call Text14.SetFocus
End Sub

Private Sub Text14_KeyUp(KeyCode As Integer, Shift As Integer)
  Text14.Text = KeyCode
End Sub
Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
  Text2.Text = KeyCode
  Call Text3.SetFocus
End Sub

Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)
  Text3.Text = KeyCode
  Call Text4.SetFocus
End Sub

Private Sub Text4_KeyUp(KeyCode As Integer, Shift As Integer)
  Text4.Text = KeyCode
  Call Text5.SetFocus
End Sub

Private Sub Text5_KeyUp(KeyCode As Integer, Shift As Integer)
  Text5.Text = KeyCode
  Call Text6.SetFocus
End Sub

Private Sub Text6_KeyUp(KeyCode As Integer, Shift As Integer)
  Text6.Text = KeyCode
  Call Text7.SetFocus
End Sub

Private Sub Text7_KeyUp(KeyCode As Integer, Shift As Integer)
  Text7.Text = KeyCode
  Call Text9.SetFocus
End Sub

Private Sub Text9_KeyUp(KeyCode As Integer, Shift As Integer)
  Text9.Text = KeyCode
  Call Text10.SetFocus
End Sub
